package inapier.agalove.thesupporter;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;

public class Tabview_Act extends TabActivity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        boolean isInit = getIntent().getBooleanExtra("init", false);
        
        TabHost tabHost = getTabHost();
        tabHost.addTab(tabHost.newTabSpec("mainTab")
        		.setIndicator("", getResources().getDrawable(R.drawable.tab_home_g))
        		.setContent(new Intent(this, Main_Act.class)));
        
        tabHost.addTab(tabHost.newTabSpec("supportTab")
        		.setIndicator("", getResources().getDrawable(R.drawable.tab_support_g))
        		.setContent(new Intent(this, ViewSupport_Act.class)));
        
        tabHost.addTab(tabHost.newTabSpec("bookmarkTab")
        		.setIndicator("", getResources().getDrawable(R.drawable.tab_favorite_g))
        		.setContent(new Intent(this, Bookmark_Act.class)));
        
        tabHost.addTab(tabHost.newTabSpec("myinfoTab")
        		.setIndicator("", getResources().getDrawable(R.drawable.tab_myinfo_g))
        		.setContent(new Intent(this, Myinfo_Act.class)));
        
        
//        tabHost.addTab(tabHost.newTabSpec("tab2")
//        		.setIndicator("list2")
//        		.setContent(new Intent(this, Loading_Act.class)));
        
        if(isInit)
        	tabHost.setCurrentTab(3);
        else
        	tabHost.setCurrentTab(0);

    }
}